import xadmin
from .models import Coupon
from .models import UserCoupon


class CouponModelAdmin(object):
    """优惠券模型管理类"""
    list_display = ["name", "coupon_type", "timer"]


xadmin.site.register(Coupon, CouponModelAdmin)


class UserCouponModelAdmin(object):
    """我的优惠券模型管理类"""
    list_display = ["user", "coupon", "start_time", "is_use"]


xadmin.site.register(UserCoupon, UserCouponModelAdmin)